﻿using FluentNHibernate.Mapping;
using ScoutersLog.Model;

namespace ScoutersLog.DataAccess.Mappings
{
    public class CouncilMap : ClassMap<Council>
    {
        public CouncilMap()
        {
            // ReSharper disable DoNotCallOverridableMethodsInConstructor
            //   Required for O/R mapping
            Id(x => x.Id)
                .Column("council_id")
                .GeneratedBy.Assigned();
            // ReSharper restore DoNotCallOverridableMethodsInConstructor
            Map(x => x.Name)
                .Column("council_name")
                .Length(50);
            Version(x => x.VersionTimeStamp)
                .Column("version_timestamp");
        }
    }
}
